-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sort CSS module exports #8817
Sort CSS module exports #8817
Conversation
Benchmark ResultsKitchen Sink ✅
Timings
Cold Bundles
Cached Bundles
React HackerNews ✅
Timings
Cold BundlesNo bundle changes detected. Cached BundlesNo bundle changes detected. AtlasKit Editor ✅
Timings
Cold Bundles
Cached Bundles
Three.js ✅
Timings
Cold Bundles
Cached BundlesNo bundle changes detected. |
Wonder if we should solve this upstream: parcel-bundler/lightningcss#291 |
@devongovett Not too fussed either way. However, while object key order is stable, I'd say relying on it isn't great and being explicit about order is a good thing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can definitely do this for now and then remove it again once it's fixed (and released) upstream
* upstream/v2: Sort global deps before injecting imports (parcel-bundler#8818) Sort CSS module exports (parcel-bundler#8817) fix: add extra information to unique bundles (parcel-bundler#8784) Don't blow up HMR when <link />s don't have hrefs (parcel-bundler#8800)
* upstream/v2: (128 commits) [webextension] Add support for `chrome_style` (#8867) Switch to SWC minifier by default (#8860) Use BitSet for bundler intersections (#8862) best key logic truncating package names (#8865) Add support for loadConfig to resolver plugins (#8847) Missing edge for multiple targets (#8854) Split large runtime manifest into separate bundles (#8837) Improvements to new resolver (#8844) Fix published files for resolver New resolver implementation in Rust (#8807) Update yarn.lock (#8843) Bump napi-rs to latest (#8838) Support .proxyrc.cjs (#8833) Sort global deps before injecting imports (#8818) Sort CSS module exports (#8817) fix: add extra information to unique bundles (#8784) Don't blow up HMR when <link />s don't have hrefs (#8800) v2.8.3 Changelog for v2.8.3 Address bug by updating an asset reference and merge conditions (#8762) ...
↪️ Pull Request
It's possible that CSS module exports are ordered differently between builds which then causes unnecessary cache invalidation. As the export order is not significant I've added a simple sort of the keys to ensure all builds are deterministic.
🚨 Test instructions
Existing tests should be sufficient.
✔️ PR Todo